package routes

import (
	"main/src/controllers"
	"main/src/middlewares"
	"github.com/gofiber/fiber/v2"
)


func OrgRoutes(app *fiber.App) fiber.Router {
	orgs := app.Group("/org", middlewares.AllRequests)
	apiv1 := orgs.Group("/api/v1", middlewares.AllRequests)
	apiv1.Get("/all", controllers.GetAllOrgs)
	apiv1.Get("/get/:id", controllers.GetOrgByID)
	apiv1.Post("/create", controllers.CreateOrg)
	apiv1.Patch("/update/:id", controllers.UpdateOrg)
	apiv1.Delete("/delete/:id", controllers.DeleteOrg)

	return apiv1
}
